#include("/include/pageForm.html",action="admin/order/search")
<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="admin/order/search" method="post">
	<div class="searchBar">
		<ul class="searchContent">
			<li>
				<label>商户号：</label>
				<input type="text" name="merchCode" value="#(merchCode)"/>
			</li>
			<li>
				<label>商户订单号：</label>
				<input type="text" name="merchOrderNo" value="#(merchOrderNo)"/>
			</li>
		</ul>
		<ul class="searchContent">
			<li>
				<label>系统订单号：</label>
				<input type="text" name="orderNo" value="#(orderNo)"/>
			</li>
			<li>
				<label>渠道商户号：</label>
				<input type="text" name="otherMerchCode" value="#(otherMerchCode)"/>
			</li>
		</ul>
		<ul class="searchContent">
			
			<li>
				<label>创建开始：</label>
				<input type="text" name="createTimeStart" value="#(createTimeStart)" class="date textInput readonly valid" datefmt="yyyy-MM-dd HH:mm:ss"/> 
			</li>
			<li>
				<label>创建结束：</label>
				<input type="text" name="createTimeEnd" value="#(createTimeEnd)" class="date textInput readonly valid" datefmt="yyyy-MM-dd HH:mm:ss"/> 
			</li>
			<li>
				<label>支付类别：</label>
				<select class="combox" name="payType">
					<option value="">全部</option>
					#for(item:payTypeList)
						<option value="#(item.code )" #(item.code == payType ? 'selected' : '' )>#(item.name ) #(item.code )</option>
					#end
				</select>
			</li>
		</ul>
		<ul class="searchContent">
			
			<li>
				<label>支付开始：</label>
				<input type="text" name="payTimeStart" value="#(payTimeStart)" class="date textInput readonly valid" datefmt="yyyy-MM-dd HH:mm:ss"/> 
			</li>
			<li>
				<label>支付结束：</label>
				<input type="text" name="payTimeEnd" value="#(payTimeEnd)" class="date textInput readonly valid" datefmt="yyyy-MM-dd HH:mm:ss"/> 
			</li>
			<li>
				<label>状态：</label>
				<select class="combox" name="orderStatus">
					<option value="">全部</option>
					<option value="TC" #(orderStatus == 'TC' ? 'selected' : '' )>下单</option>
					<option value="TS" #(orderStatus == 'TS' ? 'selected' : '' )>成功</option>
					<option value="TF" #(orderStatus == 'TF' ? 'selected' : '' )>失败</option>
					<option value="TU" #(orderStatus == 'TU' ? 'selected' : '' )>未知</option>
					<option value="TI" #(orderStatus == 'TI' ? 'selected' : '' )>处理中</option>
					<option value="DF" #(orderStatus == 'DF' ? 'selected' : '' )>退款申请</option>
					<option value="RF" #(orderStatus == 'RF' ? 'selected' : '' )>已退款</option>
				</select>
			</li>
		</ul>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="reset">重置</button></div></div></li>
			</ul>
		</div>
	</div>
	</form>
</div>

<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			#auth()
				<li><a class="icon" href="admin/order/view?id={sid}" target="navTab"><span>交易明细</span></a></li>
			#end
			#auth()
				<li><a class="icon" href="admin/order/queryOrderStatus?id={sid}" target="ajaxTodo"><span>查询结果</span></a></li>
			#end
				<li><a class="icon" href="admin/order/report" target="dwzExport" targetType="navTab"><span>导出交易明细</span></a></li>
			<li><span style="font-weight: bold;">交易总金额:#number(sumMoney.toDouble() / 100,"##,###,##0.00"),  总笔数#(page.total)</span></li>
		</ul>
	</div>

	<div class="grid">
	<table class="list" style="width: 98%" targetType="navTab" asc="asc" desc="desc" layoutH="186">
		<thead>
			<tr>
				<th width="120">商户号</th>
				
				<th width="120">上游商户号</th>
				<th width="60">上游商户名</th>
				
				<th width="150">商户/原订单号</th>
				<th width="150">系统订单号</th>
				<th width="80" align="right">交易金额(元)</th>
				<th width="60" align="right">手续费(元)</th>
				<th width="60">交易状态</th>
				<th width="60">通知结果</th>
				<th width="60">支付类别</th>
				<th width="80">渠道号</th>
				<th width="130">创建时间</th>
				<th width="130">交易时间</th>
				<th width="200">响应信息</th>
			</tr>
		</thead>
		<tbody>
			#for(item:items)
				<tr target="sid" rel="#(item.id)">
					<td>#(item.merchCode )</td>
					<td>#(item.otherMerchCode)</td>
					<td>#(item.customerName)</td>
					#if(item.payType == 'wxgjpay_refund')
					<td>#(item.originalOrderNo )</td>
					#else
					<td>#(item.merchOrderNo )</td>
					#end
					<td>#(item.orderNo )</td>
					<td align="right">#number(item.amount.toDouble() / 100,"##,###,##0.00")</td>
					<td align="right">#number(item.merchFee.toDouble() / 100,"##,###,##0.00")</td>
					<td>
						#if(item.orderStatus == 'TC' )
							下单
						#end
						#if(item.orderStatus == 'TS' )
							<font color="green">成功</font>
						#end
						#if(item.orderStatus == 'TF' )
							<font color="red">失败</font>
						#end
						#if(item.orderStatus == 'TU' )
							未知
						#end
						#if(item.orderStatus == 'TI' )
							处理中
						#end
						#if(item.orderStatus == 'CX' )
							已撤销
						#end
						#if(item.orderStatus == 'DF' )
							<font color="blue">退款申请</font>
						#end
						#if(item.orderStatus == 'RF' )
							<font color="blue">已退款</font>
						#end
					</td>
					<td>
						#if(item.notifyStatus == '0' )
							未推
						#end
						#if(item.notifyStatus == '1' )
							<font color="green">成功</font>
						#end
						#if(item.notifyStatus == '2' )
							<font color="red">失败</font>
						#end
					</td>
					<td>#(item.payTypeName )</td>
					<td>#(item.channelCode )</td>
					<td>#(item.createTime )</td>
					<td>#(item.payTime )</td>
					<td>#(item.respCode) - #(item.respMsg )</td>
				</tr>
			#end
		</tbody>
	</table>
	</div>
	
	#include("/include/page.html")

</div>
